
// 管理项目用户相关接口
import service from "./service";
// 用户相关请求地址
const API = {
  GET_ALLPRODUCT_URL: '/products/product/all',
  SEARCH_URL: '/products/product/search?name=',
  GET_SPU_BY_ID: '/products/spu',
  GET_SKU_URL: '/products/spu',

}

export const getAllProductApi = () => service.get(API.GET_ALLPRODUCT_URL)
export const searchProductApi = (name) => service.get(API.SEARCH_URL + name)
export const getSpuByIdApi = (id) => service.get(API.GET_SPU_BY_ID + '/' + id)
export const getSKUAPI = (SPUID) => service.get(API.GET_SKU_URL + `/${SPUID}` + '/sku')